package com.haiheng.voiceandbook.service

import android.app.Service
import android.content.Intent
import android.os.IBinder
import com.haiheng.voiceandbook.MyApplication
import com.haiheng.voiceandbook.viewmodel.ApplicationViewModel

class DownLoadManagerService: Service() {
    private val applicationViewModel = ApplicationViewModel(MyApplication.getInstance())
    override fun onBind(intent: Intent?): IBinder? {
        return null
    }

    override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
        //开启缓存任务
       // applicationViewModel.startCancehMainBookList()
        return super.onStartCommand(intent, flags, startId)
    }

    override fun onCreate() {
        super.onCreate()
    }

    override fun onDestroy() {
        super.onDestroy()
        //停止任务
      //  applicationViewModel.stopCancehMainBookList()
    }
}